package com.fqgj.xjd.user.common.enums;


import com.fqgj.exception.enums.MsgCodeEnum;

/**
 * Created with IntelliJ IDEA.
 * User: sm
 * Date: 2017/2/26
 * Time: 下午3:53
 * 用户模块的错误代码归类
 * <p>
 */
public enum UserErrorCodeEnum implements MsgCodeEnum {
    MOBILE_EXIST(50001, "The mobile phone number has been registered. Please login"),
    MOBILE_FORMAT_WRONG(50002, "Wrong phone number format"),
    USER_NOT_EXIST(50003, "User does not exist"),
    USER_AUTH_FAILED(50005, "User authentication failed"),
    USER_NOT_AUTHED(50006, "User not real name"),
    USER_TOKEN_NOT_EXIST(50007, "Token error"),
    ZM_PARAMS_WRONG(50008, "ZhiMa authentication failed"),
    PASSWORD_NOT_SETTED(50009, "User not set password"),
    PASSWORD_NOT_CORRECT(500038, "User account or password error"),
    PASSWORD_SETTED(50011, "User has set password"),
    ADD_USER_FAILED(50012, "Add user failure"),
    NO_CONTACT_INFO(50013, "No contact information"),
    UPDATE_AVATAR_FAIL(50014, "Head preservation failed"),
    AVATAR_URL_NOT_CORRECT(50015, "The avatar is wrong"),
    PASSWORD_NOT_VALIDATE(50016, "The password must consist of 6-16 digits, letters and special symbols"), //密码需由6-16位数字、字母、特殊符号组成
    USER_DEVICE_NOT_BINDED(50017, "New device requires OTP verification"),
    USER_DEVICE_BIND_FAIL(50018, "Device binding failure"),
    USER_DEVICE_HAS_BINDED(50019, "The device is bound"),
    MOBILE_NOT_EXIST(50020, "The phone number does not exist"),
    IDENTITY_NO_NOT_EXIST(50021, "ID number does not exist"),
    LOST_USER_ID(50022, "User ID loss"),
    PARAM_ERROR(50023, "Invalid parameter"),
    XUEXIN(50024, "The account is already in use. Please retype it"),
    JD(50025, "Authentication failure"),
    TAOBAO(50026, "Authentication failure"),
    FROZEN(50027, "Account has been frozen"),
    FROZEN_NOT_EXIST(50028, "Freeze code does not exist"),
    FROZEN_MAP_NOT_EXIST(50029, "Frozen relationship does not exist"),
    FROZEN_MAP_NEED_CATEGORY_CODE(50038, "Product categories need to be formulated"), //该冷冻类型需要制定产品类目
    CAN_NOT_EVALUATE_QUOTA(50030, "Quota assessment data is incomplete and cannot be adjusted"), // 额度评估数据不完整，无法调起额度评估
    PAYMENT_BIND_REPEATED(50031, "Can not be repeated binding"), // 该渠道已经绑定银行卡，不能重复绑定
    PICTURE_NOT_EXIST(50032, "Photos do not exist"),
    EVALUATE_QUOTA_ALREADY(50033, "Assessed quota"),
    EVALUATE_QUOTA_LESS_THEN_30DAYS(50034, "Less than 30 days from last assessment"), // 距离上次评估少于30天
    ZM_AUTH_ERROR(50035, "Failure of sesame certification"),
    ZM_AUTH_REPEAT(50036, "Duplication of authentication"), //重复认证
    QUERY_QUOTA_ERROR(50037, "Query quota failed"),
    AUTH_ERROR(50038, "Failure of customer authentication"),
    SOCIAL_HAS_BEEN_BOUND(50039, "The account has been bound"),
    APP_CODE_NOT_EMPTY(50040, "appCode can not be empty"),
    ;


    private Integer code;
    private String msg;

    public Integer getCode() {
        return code;
    }

    public UserErrorCodeEnum setCode(Integer code) {
        this.code = code;
        return this;
    }

    public String getMsg() {
        return msg;
    }

    public UserErrorCodeEnum setMsg(String msg) {
        this.msg = msg;
        return this;
    }

    UserErrorCodeEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
